import './utils/polyfill'
import Vue from 'vue'
import Vant from 'vant'
import * as VConsole from 'vconsole'
import router from './router'
import store from './store'
import global from '@/assets/js/global'
import '@/assets/js/vant-ui'
import '@/assets/js/element-ui'
// 按需引入 echarts 5.x
import echarts from './plugins/echarts'
import 'vant/lib/index.css'
// import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/sass/app.scss'
import App from './App.vue'
import '@/assets/iconfont-ceb/iconfont.js'
import '@/assets/iconfont-ceb/iconfont.css'
import Video from 'video.js'
import 'video.js/dist/video-js.css'
// 引入 lib-flexible
import 'lib-flexible/flexible'
import dayjs from 'dayjs'

require('dayjs/locale/zh-cn')
dayjs.locale('zh-cn')
const weekOfYear = require('dayjs/plugin/weekOfYear')
const isToday = require('dayjs/plugin/isToday')
const isSameOrBefore = require('dayjs/plugin/isSameOrBefore')
dayjs.extend(isSameOrBefore)
dayjs.extend(weekOfYear)
dayjs.extend(isToday)

Vue.prototype.$echarts = echarts
Vue.prototype.$video = Video

const vc = new VConsole({
  onReady: function () {
    vc.setSwitchPosition(20, 60)
  }
})

Vue.use(Vant)
Vue.use(global)
Vue.config.productionTip = false

window.projectApp = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
